﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.SimulationPerformanceRecorder.SimulationFileWriter
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using System.IO;


namespace DnProcessSimulateCommands.SimulationPerformanceRecorder;

public class SimulationFileWriter : SimulationFileAccessor
{
  private StreamWriter m_file;

  public override void openFile(string path)
  {
    this.closeFile();
    this.m_file = new StreamWriter(path);
  }

  public override void closeFile()
  {
    if (this.m_file == null)
      return;
    this.m_file.Flush();
    this.m_file.Close();
    this.m_file = (StreamWriter) null;
  }

  public override void accessFile(string line, bool ignore = false) => this.m_file.WriteLine(line);

  public override int getNumOfDiffs() => int.MaxValue;
}
